package mybook.service;

import java.util.List;
import mybook.dao.BookDao;
import mybook.model.Book;

public class BookService {
    public static final BookService instance = new BookService();
    public BookService() {}

    public List<Book> getAllBooks() {
        return BookDao.instance.getAllBooks();
    }

    public Book getBookById(int id) {
        return BookDao.instance.getBookById(id);
    }

    public void addBook(Book book) {
        BookDao.instance.addBook(book);
    }

    public void updateBook(Book book) {
        BookDao.instance.updateBook(book);
    }

    public void deleteBook(int id) {
        BookDao.instance.deleteBook(id);
    }
}